package 集思;

public class Teacher extends Person{

	private String subject = "";
	private String name = "";
	
	public Teacher(String name, int age) {
		super(name, age);
	}

	public void getD(){
		System.out.println(name+" "+age+" "+subject);
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Teacher t = new Teacher("Mary", 23);
		t.subject = "English";
		t.age -= 3;
		t.getD();

	}

}

class Person{
	private String name="";
	int age;
	public Person(String name, int age){
		this.name = name;
		this.age = age;
	}
}